/**
*      author: Y_Yao
*      created: 2025-03-29 17:20:29
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
const int N = 3e5 + 7;
int pre[N],suf[N];
string s1,s2;

void solve()
{
    cin >> s1 >> s2;
    int n = s1.size(),m = s2.size();
    s1 = " " + s1;
    s2 = " " + s2;
    pre[0] = 1,suf[n+1] = 1;
    for(int i = 1;i <= m;i++)
    {
        if(pre[i-1] && (s1[i] == s2[i] || s1[i] == '?' || s2[i] == '?')) pre[i] = 1;
    }
    
    for(int i = n,j = m;i >= 0 && j >= 0;i--,j--)
    {
        if(suf[i+1] && (s1[i] == s2[j] || s1[i] == '?' || s2[j] == '?'))
        {
            suf[i] = 1;
        }
    }

    for(int i = 0;i <= m;i++)
    {
        if(pre[i] && suf[n - (m - i) + 1]) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    // cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}